#include "list"

namespace Controls
{
	class PPCtrl : public wxWindow
	{
	public:
		PPCtrl(
			wxWindow *parent, wxWindowID id = 1, 
			const wxPoint& pos = wxDefaultPosition, 
			const wxSize& size = wxDefaultSize, 
			long style = wxTAB_TRAVERSAL
			);
		~PPCtrl();

	protected:
		class ITEM
		{
		public:
			wxRect rect;
		};
		std::list<ITEM*> m_itemlist;

	protected:
		virtual void DrawItem(wxDC* pDC, const ITEM* pITEM);
		virtual void RepositionItems();

		virtual void UpdateScrollBars();

	protected:
		void TransformD2L(wxRect& rect);
		void TransformD2L(wxPoint& point);

		void TransformL2D(wxPoint& point);
		void TransformL2D(wxRect& rect);

		void ClearAll();

	private:
		void OnSize(wxSizeEvent& event);
		void OnPaint(wxPaintEvent& event);
		DECLARE_EVENT_TABLE()
	};

}